package PolymorphicHomeworkTest1;
/*
测试类
 */
public class Test {
    public static void main(String[] args){
        //创建乐手对象
        Musician m = new Musician();
        //创建乐器对象
        Instrument e = new Erhu();
        Instrument p = new Piano();
        Instrument v = new Violin();
        //调用弹奏方法，开始弹奏
        m.play(e);
        m.play(p);
        m.play(v);
    }
}
